package com.dkd.provider;

import com.dkd.common.core.domain.AjaxResult;
import com.dkd.common.core.domain.entity.SysUser;
import com.dkd.common.utils.StringUtils;
import com.dkd.interfaceinfo.domain.InerUser;
import com.dkd.interfaceinfo.mapper.InerUserMapper;
import com.dkd.system.mapper.SysUserMapper;
import com.dkd.system.service.ISysUserService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
public class InerUserInfoImpl implements InerUserInfo{

    @Autowired
    private InerUserMapper inerUserMapper;
    @Override
    public InerUser userInfo(String accesskey) {
                if (StringUtils.isBlank(accesskey)){
            throw new RuntimeException("accesskey不能为空");
        }
        InerUser sysUser = inerUserMapper.selectUserByAccesskey(accesskey);

//        sysUser.getUserId()+"and"+ sysUser.getSecretkey();
        return  sysUser;
    }
}
